package cn.jolyoulu.cmnservice.serivce.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.jolyoulu.cmnservice.dao.SysDictTypeMapper;
import cn.jolyoulu.cmnservice.entity.po.SysDictType;
import cn.jolyoulu.cmnservice.serivce.SysDictTypeService;

@Service
public class SysDictTypeServiceImpl extends ServiceImpl<SysDictTypeMapper, SysDictType> implements SysDictTypeService {

    @Autowired
    private SysDictTypeMapper sysDictTypeMapper;

    @Override
    public SysDictType getByDictType(String dictType) {
        LambdaQueryWrapper<SysDictType> ew = new LambdaQueryWrapper<>();
        ew.eq(SysDictType::getDictType,dictType);
        return sysDictTypeMapper.selectOne(ew);
    }
}